package com.ruoyi.system.mapper;

import com.ruoyi.system.domain.YfsOrderList;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface YfsOrderListMapper {

    Integer insertYfsOrderList(@Param("yfsOrderList") YfsOrderList yfsOrderList);


    @Select("SELECT * FROM yfs_order_list WHERE user_id = #{userId} AND goods_list_id = #{goodsListId} AND status = #{status} AND insurance = #{insurance}")
    List<YfsOrderList> selectList(@Param("userId") String userId, @Param("goodsListId") String goodsListId,@Param("status") Integer status, @Param("insurance")Integer insurance);

    @Update("update yfs_order_list set status = #{yfs.status} where id = #{yfs.id}")
    Integer updateById(@Param("yfs") YfsOrderList orderList);

    List<YfsOrderList> selectListByGoodsListId(@Param("userId") String userId,@Param("insurance") Integer insurance,@Param("status") int i);

    @Delete("delete from yfs_order_list where id = #{id}")
    Integer deleteByOrderId(@Param("id") Integer id);
}
